<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Aquamat: Plik źródłowy one_wire.h (r58/r57)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Wygenerowano przez Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Strona&nbsp;główna</span></a></li>
      <li><a href="pages.html"><span>Dodatkowe&nbsp;strony</span></a></li>
      <li><a href="annotated.html"><span>Struktury&nbsp;Danych</span></a></li>
      <li class="current"><a href="files.html"><span>Pliki</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;plików</span></a></li>
      <li><a href="globals.html"><span>Globalne</span></a></li>
    </ul>
  </div>
<h1>one_wire.h (r58/r57)</h1><a href="one__wire_8h.html">Idź do dokumentacji tego pliku.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    Aquamat - Sterownik akwariowy Open Source</span>
<a name="l00003"></a>00003 <span class="comment">    Copyright (C) 2009 Wojciech Todryk (wojciech@todryk.pl)</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">    This program is free software; you can redistribute it and/or modify</span>
<a name="l00006"></a>00006 <span class="comment">    it under the terms of the GNU General Public License as published by</span>
<a name="l00007"></a>00007 <span class="comment">    the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00008"></a>00008 <span class="comment">    (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">    This program is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00013"></a>00013 <span class="comment">    GNU General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">    You should have received a copy of the GNU General Public License</span>
<a name="l00016"></a>00016 <span class="comment">    along with this program; if not, write to the Free Software</span>
<a name="l00017"></a>00017 <span class="comment">    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span>
<a name="l00018"></a>00018 <span class="comment">    </span>
<a name="l00019"></a>00019 <span class="comment">    $Id: one_wire.h 41 2009-02-23 23:01:59Z musashi@todryk.pl $</span>
<a name="l00020"></a>00020 <span class="comment">*/</span>
<a name="l00021"></a>00021 
<a name="l00026"></a><a class="code" href="one__wire_8h.html#a73d58e90d7a5605ea1f06cf42fd9fb32">00026</a> <span class="preprocessor">#define ONEWIRE_PORTOUT PORT(ONEWIRE_PORT)</span>
<a name="l00027"></a><a class="code" href="one__wire_8h.html#a577201b9b29caabb4112a7af8f12bd01">00027</a> <span class="preprocessor"></span><span class="preprocessor">#define ONEWIRE_PORTIN  PIN(ONEWIRE_PORT)</span>
<a name="l00028"></a><a class="code" href="one__wire_8h.html#abd43834f9a939785b5d813a1abaa8fb6">00028</a> <span class="preprocessor"></span><span class="preprocessor">#define ONEWIRE_DDR     DDR(ONEWIRE_PORT)</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a><a class="code" href="one__wire_8h.html#acf77a3a68a14349d7973af04cf134613">00030</a> <span class="preprocessor">#define onewire_0() ONEWIRE_DDR |= _BV(ONEWIRE_PIN)</span>
<a name="l00031"></a><a class="code" href="one__wire_8h.html#a9150d8293de456b7c05d4b6156dbddf4">00031</a> <span class="preprocessor"></span><span class="preprocessor">#define onewire_1() ONEWIRE_DDR &amp;= ~_BV(ONEWIRE_PIN)</span>
<a name="l00032"></a><a class="code" href="one__wire_8h.html#ad9098b1365a20c9086c07a014d4521df">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define onewire_get() ONEWIRE_PORTIN &amp; _BV(ONEWIRE_PIN)</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00034"></a><a class="code" href="one__wire_8h.html#ad6a53c35b07f99ca690cbe4714b78ebb">00034</a> <span class="preprocessor">#define ONEWIRE_READ_ROM_COMMAND 0x33</span>
<a name="l00035"></a><a class="code" href="one__wire_8h.html#a9b2cbb5991ea9280c8a21931834a26d5">00035</a> <span class="preprocessor"></span><span class="preprocessor">#define ONEWIRE_SKIP_ROM_COMMAND 0xCC</span>
<a name="l00036"></a><a class="code" href="one__wire_8h.html#ab2e8dae23f62275651559460a8d685e5">00036</a> <span class="preprocessor"></span><span class="preprocessor">#define ONEWIRE_SEARCH_ROM_COMMAND 0xF0</span>
<a name="l00037"></a><a class="code" href="one__wire_8h.html#a58c2c23038ab3be5fd332756e4d5abe7">00037</a> <span class="preprocessor"></span><span class="preprocessor">#define ONEWIRE_MATCH_ROM_COMMAND 0x55</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 <span class="keywordtype">void</span> <a class="code" href="one__wire_8c.html#ac6a21039977d29da711c6b094c87bf3e">onewire_init</a>(<span class="keywordtype">void</span>);
<a name="l00040"></a>00040 uint8_t <a class="code" href="one__wire_8c.html#a2ad618d6447787d46f1018d1b304d623">onewire_present</a> (<span class="keywordtype">void</span>);
<a name="l00041"></a>00041 <span class="keywordtype">void</span> <a class="code" href="one__wire_8c.html#a10d8164cde368976c5baa12fdf1cec38">onewire_write_slot</a>(uint8_t);
<a name="l00042"></a>00042 uint8_t <a class="code" href="one__wire_8c.html#a1582cd8808dc41096206c5980a326ef1">onewire_read_slot</a>(<span class="keywordtype">void</span>);
<a name="l00043"></a>00043 <span class="keywordtype">void</span> <a class="code" href="one__wire_8c.html#a784929df5ad11e42c26a22bba5f5ea56">onewire_write_byte</a>(uint8_t);
<a name="l00044"></a>00044 uint8_t <a class="code" href="one__wire_8c.html#adccefe5d31346e88a520d897b69ccb1c">onewire_read_byte</a>(<span class="keywordtype">void</span>);
<a name="l00045"></a>00045 uint8_t <a class="code" href="one__wire_8c.html#a7ac2292392fef0cb3e0c2a0c715c92c2">onewire_crc8</a>(uint8_t*,uint8_t);
<a name="l00046"></a>00046 <span class="keywordtype">void</span> <a class="code" href="one__wire_8c.html#a636dace40cc8433794faebba051fc7ae">onewire_read_rom</a>(uint8_t*);
<a name="l00047"></a>00047 <span class="keywordtype">void</span> <a class="code" href="one__wire_8c.html#a776c48d301c192526d377821715baaf4">onewire_skip_rom</a>(<span class="keywordtype">void</span>);
<a name="l00048"></a>00048 <span class="keywordtype">void</span> <a class="code" href="one__wire_8c.html#a7eccf2895b0f9f9b88e7bdc206d5a7b0">onewire_match_rom</a>(uint8_t *);
<a name="l00049"></a>00049 uint8_t <a class="code" href="one__wire_8c.html#af22fe1a48a246cf1ee25f2355fbd14ce">onewire_search_first</a> (uint8_t*);
<a name="l00050"></a>00050 uint8_t <a class="code" href="one__wire_8c.html#a7fb17d1a58d7b14039d5dc90cd4209cd">onewire_search_next</a>(uint8_t*);
<a name="l00051"></a>00051 uint8_t <a class="code" href="one__wire_8c.html#acdd3a7b6bb187fcb044f15b11f6f4c9c">onewire_search</a>(uint8_t*);
<a name="l00052"></a>00052 
<a name="l00053"></a>00053 <span class="keyword">extern</span> uint8_t <a class="code" href="one__wire_8c.html#a04dfe244d07341b97914ef12f60a32b5">last_discrepency</a>;
<a name="l00054"></a>00054 <span class="keyword">extern</span> uint8_t <a class="code" href="one__wire_8c.html#ab430dba773e1904461185c68152b9970">last_device_flag</a>;
</pre></div></div>
<hr size="1">
<div style="text-align: center;">
<small>Projekt udostępniony jest na zasadach Open Source. Zapoznaj się z warunkami licencji w pliku COPYING znajdujacym się w katalogu głównym.	</small>
</div>

<hr size="1">
<div style="text-align: center;">
Aquamat - sterownik akwarystyczny Open Source
<br/>
Copyright (C) 2009  <a href="http://todryk.pl">Wojciech Todryk</a> (wojciech(at)todryk(dot)pl)
</div>

<div style="text-align: right;">
<small>Dokumentację wygenerowano za pomocą programu&nbsp;</small>
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a>
<small> wersja 1.6.1 (Fri Apr 23 22:48:16 2010)&nbsp;</small>
</div>
